<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		
		<div id="showInfor"></div>

		<script type="text/javascript">
			function Person(name, chinese, math) {

				this.name = name;
				this.chinese = chinese;
				this.math = math;

			}
				Person.prototype.getName=function(){
				
				return this.name;
				
			}
			Person.prototype.getChinese=function(){
				
				return this.chinese;
				
			}
		
			Person.prototype.getMath=function(){
				
				return this.math;
				
			}
			
			function Student(name,chinese,math,age){//继承属性
				
				Person.call(this,name,chinese,math);
				this.age=age;
			}
			
			Student.prototype=new Person();//继承方法
			
			Student.prototype.getAge=function(){
				
				return this.age;
			}
			
			var student1=new Student("张三",98,80,25);
			
				function show()  {

				var str = "名字：" + student1.name + "<br/>语文：" +student1.chinese + "<br/>数学：" + student1.math+"<br/>年龄："+student1.age;

				document.getElementById("showInfor").innerHTML = str;

			}
		 show();
		</script>
	</body>

</html>